<template>
  <div>
    <div class="home-infoblock" v-for="(item, index) in houseList" :key="index">
      <div class="block-title">
        <i></i>
        热门房源
      </div>

      <div class="block-img">
        <img :src="item.img" alt="" />
      </div>

      <div class="block-info">
        <!-- 左 -->
        <div class="info-left">
          <p>{{ item.title }}</p>
          <!-- <p>1室1厅 -48m²</p> -->
          <p>{{ item.huxing }} -{{ item.area }}m²</p>
        </div>
        <!-- 右 -->
        <div class="info-right">
          <div class="info-right-zu">{{ item.zftype }}</div>
          <p class="info-right-pic">{{ item.price }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "InfoBlock",
  data() {
    return {};
  },
  props: {
    houseList: {
      type: Array,
      default: [],
    },
  },
};
</script>

<style>
.home-infoblock {
  position: relative;
}
.block-title i {
  display: inline-block;
  width: 0.1rem;
  height: 0.3rem;
  background-color: black;
}
.block-title {
  text-align: left;
  font-size: 0.3rem;
  color: rgba(000, 000, 000, 0.8);
  padding: 0.12rem 0 0.15rem 0.2rem;
}
.block-img {
  width: 100%;
  height: 3.44rem;
}
.block-img img {
  width: 100%;
  height: 100%;
}
.block-info {
  display: flex;
  align-items: center;
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
}
.info-left {
  flex: 1;
  padding: 0.18rem 0 0.18rem 1.2rem;
}
.info-right {
  flex: 1;
  /* margin: auto; */
  margin-right: 1.08rem;
}
.block-info p {
  font-size: 0.12rem;
}
.info-right-zu {
  border-radius: 0.08rem;
  margin: 0 auto;
  width: 0.8rem;
  font-size: 0.4rem;
  border: 1px solid #000000;
  padding: 0 0.2rem;
}
.info-right-pic {
  color: #ff5555;
  font-weight: 900;
}
</style>